<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/djlc/cw_djlc_cwzb.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/djlc/cw_djlc_cwzb.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_djlc_cwzb_id',
                footer: "Foots",
                cnName: '财务变动取值主表',
                name: 'djlc/cw_djlc_cwzb',
                url: "/cw_djlc_cwzb/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"vehiclekeyword":"","salechannel":"","pilothouse":"","fuel":"","vehicletype":"","drivetype":"","artificial":"","changepowercost":"","changematerials":"","changemaintenance":"","salescommission":"","vehiclelogisticsfee":"","sanbaoserviceFee":""});
            const editFormOptions = ref([[{"title":"关键词","field":"vehiclekeyword"},
                               {"title":"销售渠道","field":"salechannel"}],
                              [{"title":"平台","field":"pilothouse"},
                               {"title":"燃料类型","field":"fuel"}],
                              [{"title":"车型种类","field":"vehicletype"},
                               {"title":"驱动形式","field":"drivetype"}],
                              [{"title":"直接人工","required":true,"field":"artificial","type":"decimal"},
                               {"title":"变动动力费","required":true,"field":"changepowercost","type":"decimal"}],
                              [{"title":"变动辅材","required":true,"field":"changematerials","type":"decimal"},
                               {"title":"变动维修及工废","required":true,"field":"changemaintenance","type":"decimal"}],
                              [{"title":"销售提成","required":true,"field":"salescommission","type":"decimal"}],
                              [{"title":"整车物流费","required":true,"field":"vehiclelogisticsfee","type":"decimal"},
                               {"title":"三包服务费","required":true,"field":"sanbaoserviceFee","type":"decimal"}]]);
            const searchFormFields = ref({"vehiclekeyword":"","salechannel":"","pilothouse":""});
            const searchFormOptions = ref([[{"title":"关键词","field":"vehiclekeyword"},{"title":"销售渠道","field":"salechannel"},{"title":"平台","field":"pilothouse"}]]);
            const columns = ref([{field:'cw_djlc_cwzb_id',title:'财务主表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'vehiclekeyword',title:'关键词',type:'string',width:120,align:'left',sort:true},
                       {field:'salechannel',title:'销售渠道',type:'string',width:120,align:'left'},
                       {field:'pilothouse',title:'平台',type:'string',width:120,align:'left'},
                       {field:'fuel',title:'燃料类型',type:'string',width:120,align:'left'},
                       {field:'vehicletype',title:'车型种类',type:'string',width:120,align:'left'},
                       {field:'drivetype',title:'驱动形式',type:'string',width:120,align:'left'},
                       {field:'artificial',title:'直接人工',type:'decimal',width:110,require:true,align:'left'},
                       {field:'changepowercost',title:'变动动力费',type:'decimal',width:110,require:true,align:'left'},
                       {field:'changematerials',title:'变动辅材',type:'decimal',width:110,require:true,align:'left'},
                       {field:'changemaintenance',title:'变动维修及工废',type:'decimal',width:110,require:true,align:'left'},
                       {field:'salescommission',title:'销售提成',type:'decimal',width:110,require:true,align:'left'},
                       {field:'vehiclelogisticsfee',title:'整车物流费',type:'decimal',width:110,require:true,align:'left'},
                       {field:'sanbaoserviceFee',title:'三包服务费',type:'decimal',width:110,require:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'status',title:'状态',type:'byte',width:110,hidden:true,require:true,align:'left'},
                       {field:'lianhetong',title:'联合通',type:'decimal',width:110,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
